package cn.edu.guet.service.om.impl;

import cn.edu.guet.bean.om.DGroup;
import cn.edu.guet.mapper.om.DGroupMapper;
import cn.edu.guet.service.om.DGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class DGroupServiceImpl implements DGroupService {
    @Autowired
    DGroupMapper dGroupMapper;

    @Override
    public List<DGroup> viewDGroup(Integer gid) {
        return dGroupMapper.viewDGroup(gid);
    }

    @Override
    public DGroup findById(Integer gid) {
        return dGroupMapper.findById(gid);
    }

    @Override
    public void update(DGroup dGroup) {
        dGroupMapper.update(dGroup);
    }

    @Override
    public String getRole(String loginusername) {
        return dGroupMapper.getRole(loginusername );
    }

    @Override
    public Integer getGid(String loginusername) {
        return dGroupMapper.getGid(loginusername );
    }
}
